var app=getApp()
Page({
  data:{
    menu:[
      {
        title:"家居客户",
        child: [
          {"MenuName":"我的客户","PageName":"crmcustomer","query":1},
          {"MenuName":"新建客户","PageName":"crmcustomeradd"}
          ],
        menuid:'850'
      },
      {
        title:"渠道商",
        child: [
          {"MenuName":"渠道商列表","PageName":"crmchannel"},
          {"MenuName":"新建渠道商","PageName":"crmchanneledit"}
          ],
        menuid:'865'
      }
    ],
    author:[]
  },
  onLoad(query) {
    // 页面加载
    var _this = this
    console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
    if (!app.globalData.user.MenuDescription) {
      app.checkLoginEnd = res => {
        _this.setData({
          author:res.MenuDescription.split(",")
        })
      }
    }
  },
  onReady() {
    // 页面加载完成
  },
  onShow() {
    // 页面显示
  },
  onHide() {
    // 页面隐藏
  },
  onUnload() {
    // 页面被关闭
  },
  onTitleClick() {
    // 标题被点击
  },
  onPullDownRefresh() {
    // 页面被下拉
  },
  onReachBottom() {
    // 页面被拉到底部
  },
  onShareAppMessage() {
    // 返回自定义分享信息
    return {
      title: 'My App',
      desc: 'My App description',
      path: 'pages/index/index',
    };
  },
});
